package com.oa.modules.sys.dao;

import com.oa.modules.sys.entity.TSysDictitemEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 系统字典表
 * 
 * @author sunhui
 * @email admin
 * @date 2019-09-01 18:25:42
 */
@Mapper
public interface TSysDictitemDao extends BaseMapper<TSysDictitemEntity> {
    /**
     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
     * @Author Ark
     * @Description 获取列表
     * @Date 11:09 2020/5/27 0027
     * @Param [map]
     **/
    @Select("<script>select " +
            " A.* " +
            " from t_sys_dictitem A " +
            " where A.GROUP_ID = #{params.groupId}" +
            " <when test='params.dictValue !=`` and params.dictValue != null'> and A.DICT_VALUE = #{params.dictValue} </when>" +
            " ORDER BY A.ORDER</script>")
    List<TSysDictitemEntity> queryList(@Param("params") Map<String, Object> params);
}
